package com.dgut.usermodule.entity;


import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;
import org.hibernate.annotations.DynamicUpdate;

@Entity
@Table(name="t_perm")
@DynamicUpdate(true)
public class Permission {
	private Long id;
	private String identifier;
	private String url;
	private String urlName;
	private String parentTree;
	
	@Id
	@GeneratedValue(strategy=GenerationType.IDENTITY)
	public Long getId() {
		return id;
	}
	@Column(nullable=false)
	public String getUrl() {
		return url;
	}
	@Column(nullable=false,unique=true)
	public String getUrlName() {
		return urlName;
	}
	public String getParentTree() {
		return parentTree;
	}
	@Column(nullable=false)
	public String getIdentifier() {
		return identifier;
	}
	public void setIdentifier(String identifier) {
		this.identifier = identifier;
	}
	public void setId(Long id) {
		this.id = id;
	}
	public void setUrl(String url) {
		this.url = url;
	}
	public void setUrlName(String urlName) {
		this.urlName = urlName;
	}
	public void setParentTree(String parentTree) {
		this.parentTree = parentTree;
	}
	@Override
	public String toString() {
		return "Permission [id=" + id + ", identifier=" + identifier + ", url=" + url + ", urlName=" + urlName
				+ ", parentTree=" + parentTree + "]";
	}
	
	
}
